$(window).load(function() {
        var facebookCount = "";
        var twitterCount = "";
       
        $.get("http://graph.facebook.com/?id=" + baseUrl, function(success) {
            facebookCount = success.shares;
            if (!facebookCount) {
                facebookCount = "Teilen!"
            };
            $(".facebook")
                .html("<i class='fa fa-facebook'></i> " + facebookCount)
                .attr("href", "https://www.facebook.com/sharer/sharer.php?u=" + baseUrl);
        });
        $.ajax({
            type: "get",
            dataType: 'jsonp',
            url: "https://cdn.api.twitter.com/1/urls/count.json?url=" + baseUrl
        }).done(function(response) {
            twitterCount = response.count;
            if (twitterCount == 0) {
                twitterCount = "Teilen!"
            };
            $(".twitter")
                .html("<i class='fa fa-twitter'></i> " + twitterCount)
                .attr("href", "https://twitter.com/home?status=" + baseUrl + "&text=weil wir gut sind");
        });
        var params = {
            id: baseUrl,
        };
        gapi.client.setApiKey('AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ');

        gapi.client.rpcRequest('pos.plusones.get', 'v1', params).execute(function(resp) {
            googleCount = resp.result.metadata.globalCounts.count;
            if (googleCount == 0) {
                googleCount = "Teilen!"
            };
            $(".google")
                .html("<i class='fa fa-google'></i>  " + googleCount)
                .attr("href", "https://plus.google.com/share?url=" + baseUrl);
        });
    });